#include <iostream>

using namespace std;

#define SQ(x) x*x
#define SQ2(x) (x)*(x)

inline int SQ3(int y) { return y * y; }

int main()
{
    int n, sq;

    n = 3;

    cout << "#define SQ(x) x*x ==>" << endl;
    sq = SQ(n); // 3*3=9
    cout << "n=" << n << " ";
    cout << "sq=" << sq << endl;

    sq = SQ(n + 1); // 3+1*3+1=7
    cout << "n+1=" << n + 1 << " ";
    cout << "sq=" << sq << endl;

    cout << "#define SQ2(x) (x)*(x) ==>" << endl;
    sq = SQ2(n + 1); //(3+1)*(3+1)=16
    cout << "n+1=" << n + 1 << " ";
    cout << "sq=" << sq << endl;

    cout << "inline int SQ3(int y) { return y * y; } ==>" << endl;
    sq = SQ3(n + 1); //4*4=16
    cout << "n+1=" << n + 1 << " ";
    cout << "sq=" << sq << endl;

    return 0;
}